Image reading system and image reading program

ABSTRACT

An object of this invention is to provide an image reading apparatus which can reselect a film type after prescanning, and after confirming the result on the monitor, perform actual scanning. To achieve this object, a film scanner selects from a color table storage a color table corresponding to the type of film, sets the color table in an image data converter, and performs prescanning. If the user reselects a film type after prescanning, the color table set before prescanning and a color table selected after prescanning are transferred to a confirmation image changing unit where the difference between the two tables is calculated. Prescanned image data is transferred from a memory to the confirmation image changing unit, added to the difference, and returned to the memory. The color table selected after prescanning is set in the image data converter, and scanning for obtaining a high-resolution image is executed.

FIELD OF THE INVENTION

[0001] The present invention relates to a technique of reading an imageon a film and, more particularly, to a technique of effectively readingan image printed on a photographic film or the like and reproducing ahigh-quality image.

BACKGROUND OF THE INVENTION

[0002] A film scanner is an apparatus for obtaining an image printed ona film as digital data.

[0003] The arrangement of the film scanner will be explained withreference to FIG. 9.

[0004]FIG. 9 is a block diagram showing a scanner. Reference numeral 101denotes a light source which irradiates a film 102. The film 102 is apositive color film or negative color film. Reference numeral 103denotes an imaging lens; and 104, a CCD on which an image on the film102 is formed via the lens 103. The CCD includes line sensor CCDs forthree colors, to which R, G, and B color separation filters arerespectively adhered. An image on a film is color-separated and outputas analog signals. Reference numeral 105 denotes an A/D converter whichconverts an analog signal into a digital signal. The digital signal isoutput as 10-bit data for each of R, G, and B. Reference numeral 106denotes a color table storage which stores color conversion tables forrespective negative film types. The color conversion table is aone-dimensional LUT (Look-Up Table) for each of R, G, and B. That is,three LUTs are prepared for each film. FIG. 10 shows an example of theLUT. With this conversion table, 10-bit negative data is converted into8-bit positive data. For example, as for color negative films, the colorbalance and tone characteristic change between films of respectivetypes. Thus, an LUT must be prepared for each film. Reference numeral107 denotes an image data converter which converts image data by using aone-dimensional LUT stored in the color table storage 106. A negativeimage is converted into a positive image with an adjusted color balance,resulting in B-bit data for each of R, G, and B. Reference numeral 108denotes a memory in which image data processed by the image dataconverter 107 is written. After an image of one frame is written, theimage is transferred to a host PC (not shown).

[0005] A conventional scanning sequence executed under the control ofthe host PC will be explained.

[0006] <Step S1>

[0007] The user loads a film into a scanner.

[0008] <Step S2>

[0009] The scanner automatically determines a film type from a bar codeprinted on the film.

[0010] <Step S3>

[0011] A color table (LUT: Look-Up Table) corresponding to the film typeis automatically set in the scanner. Alternatively, the user sets an LUTby designating an arbitrary film type.

[0012] <Step S4>

[0013] Prescanning for obtaining a low-resolution confirmation image isperformed.

[0014] <Step S5>

[0015] The user selects an image to be actually used from prescannedimages, and executes scanning for obtaining a high-resolution image.

[0016] In scanning a transparent original such as a photographic film,the original is irradiated by the light source. Transmitted light isconverted into an electrical signal by the photoelectric converter, andthe electrical signal is A/D-converted, obtaining desired digital data.The obtained digital signal is converted into a digital signal as ascanner output signal via a digital signal conversion table (look-uptable).

[0017] In general, image scanning of this type is performed in two,prescanning and actual scanning.

[0018] Prescanning is first done at a low resolution. Prescanningconditions are unique settings determined depending on the film typesuch as a negative or positive film. A prescanned image is displayed asa preview image on the monitor. The user observes this preview image,manually sets the brightness, color balance, and the like for actualscanning, and then performs actual scanning.

[0019] According to this method, however, the user must determine actualscanning settings for each original, a long time is taken for processingmany images, and a heavy burden is put on the user. To solve thisproblem, there is considered a method of analyzing a prescanned image bya computer, automatically setting scanning conditions for actualscanning on the basis of the analysis result, and performing actualscanning.

[0020] For example, the average brightness of an original is calculatedfrom a prescanned image, the light quantity of the light source ischanged in accordance with the brightness, and the CCD arrival lightquantity is adjusted. Alternatively, the scanning speed (feed speed) isadjusted, and scanning suitable for each original is performed,effectively acquiring information printed on the original. In additionto this method, there is proposed another scanning method of executingpre-prescanning before prescanning.

[0021] That is, the prescanning precision is further increased inadvance by adding one scanning step before prescanning so as to executeprescanning and actual scanning under conditions optimal for each filmtype with respect to various negative-base color film densities. As aresult, the precision of subsequent actual scanning is increased. Inthis case, pre-prescanning is performed at unique settings determined inadvance, acquiring a negative-base digital count in the negative-baseregion. Prescanning is executed at analog settings which change thenegative-base digital count to a predetermined value. This increases theprescanning and actual scanning precisions.

[0022] An original is irradiated by the light source, transmitted lightis converted into a linear electrical signal by the photoelectricconverter at the original transmission ratio, and the electrical signalis A/D-converted into a digital signal. The obtained digital signal isfurther converted into a digital signal as a scanner output via alook-up table. By changing the look-up table, the scanner can cope withthe film type such as a negative or positive film. For example, actuallyavailable scanners adopt a method of manually or automatically selectinga plurality of look-up tables for respective films that are accumulatedin a host computer, and removing the color balance characteristic whichchanges between films of respective types.

[0023] In the above-described prior art, the film type is decided infilm loading. In other words, an LUT for use is decided in film loading.The film type automatically selected in film loading or the film typearbitrarily selected by the user cannot be changed after prescanning,which poses a problem. The scanner may mistake automatic determinationof the film type and misidentify the film type. In this case, if theuser is not aware of the misidentification and performs prescanning, anLUT not suitable for the film is used, and a prescanned image is poor incolor balance. At this time, the user becomes aware of misidentificationof the film type, but cannot change the film type (LUT) and continuework because the film type and a corresponding LUT have already beendecided. The user must interrupt work and restart it from film loading.

[0024] In the method of calculating the average brightness of anoriginal from a prescanned image and deciding analog settings (lightquantity, scanning speed, electrical gain, offset, and the like) foractual scanning, if prescanning is done using a look-up table whichchanges depending on the film type, the average brightness range changesfor each exposure condition (underexposure, correct exposure, oroverexposure) because the shapes of respective look-up tables aredifferent. The exposure condition of the negative film of an originalcannot be accurately grasped, and actual scanning cannot be performed atoptimal analog settings.

[0025] In the method of determining an exposure condition from theaverage brightness of a prescanned image, if acquisition of the digitalcount of the negative-base region in pre-prescanning fails due to anyreason, analog settings which set the negative-base digital count to apredetermined value cannot be obtained. The exposure condition cannot bedetermined from the average brightness calculated from the prescannedimage.

[0026] A prescanned image is displayed as a preview image on themonitor. The preview image must be an image which simulates an image inactual scanning. When analog settings are the same between prescanningand actual scanning, the same A/D-converted digital data are input tothe look-up table. A look-up table for a prescanned image is so changedas to obtain the optimal brightness and color balance, the prescannedimage is corrected, and an actual scanning look-up table correspondingto the corrected prescanned image is set.

[0027] However, when analog settings are different between prescanningand actual scanning, different A/D-converted digital data are input tothe look-up table. The colors of a preview image and actually scannedimage cannot coincide with each other unless A/D-converted digital datain actual scanning is predicted from a prescanned image.

[0028] If a prescanned image is scanned using a look-up table for eachfilm type in predicting A/D-converted digital data in actual scanningfrom a prescanned image, A/D-converted digital data in actual scanningcannot be predicted directly from the prescanned image because thelook-up table for each film type is a conversion table which has anonlinear relationship with A/D-converted digital data. In this case,the look-up table used in prescanning must be searched for on the basisof the digital count of the prescanned image, and A/D-converted digitaldata in prescanning must be calculated to predict digital data in actualscanning. This greatly complicates processing of making the colors of apreview image and actually scanned image coincide with each other.

SUMMARY OF THE INVENTION

[0029] It is an object of the present invention to allow reselecting thefilm type (LUT) again even after prescanning.

[0030] It is another object of the present invention to allow toreproduce a high-quality image by accurately determining the exposurecondition of the negative film of an original and performing optimalanalog settings, to eliminate the color balance characteristic whichchanges depending on the film type, and to easily simulate an actualscanning image by a preview image at a high precision.

[0031] To solve the above-described problems and achieve the aboveobjects, according to the first aspect of the present invention, animage reading system which can read a film original and performs atleast two scanning operations including prescanning and actual scanningis characterized by comprising a film type selecting unit, wherein afilm type can be selected by the film type selecting unit afterobtaining at least prescanned image data.

[0032] The image reading system according to the present invention isalso characterized in that the system further comprises an imagechanging unit adapted to change prescanned image data, and when the filmtype is changed by the film type selecting unit after obtainingprescanned image data, the prescanned image data is changed by the imagechanging means in accordance with the changed film type.

[0033] According to the second aspect of the present invention, an imagereading program in an image reading system which can read a filmoriginal and performs at least two scanning operations includingprescanning and actual scanning is characterized by comprising aprescanning module for obtaining prescanned image data, an actualscanning module for obtaining actually scanned image data, and a filmtype selecting module, wherein a film type can be selected in the filmtype selecting module after obtaining at least the prescanned imagedata.

[0034] According to the third aspect of the present invention, an imagereading system which can read a film original and performs at least twoscanning operations including prescanning and actual scanning ischaracterized by comprising a photoelectric conversion unit adapted toread light having transmitted through the film original and convertingthe transmitted light into an electrical signal, an adjustment unitadapted to adjust level of the electrical signal output from thephotoelectric conversion means, an A/D conversion unit adapted toconvert the electrical signal whose level is adjusted by the adjustmentunit into digital data, a table conversion processing unit adapted toperform table conversion processing for the digital data by using alook-up table, and a control unit to determine an exposure state of thefilm original from prescanned image data which has undergone tableconversion processing by the table conversion processing unit and islinear with respect to an output from the A/D conversion unit, settingan adjustment state of the adjustment unit in actual scanning inaccordance with the exposure state, performing digital calculation forthe prescanned image data, and generating display image data whichreflects a setting of the adjustment state.

[0035] According to the fourth aspect of the present invention, an imagereading program in an image reading system which can read a filmoriginal, comprises photoelectric conversion unit adapted to read lighthaving transmitted through the film original and converting thetransmitted light into an electrical signal, an adjustment unit adaptedto adjust level of the electrical signal output from the photoelectricconversion unit, and an A/D conversion unit adapted to convert theelectrical signal whose level is adjusted by the adjustment unit intodigital data, and performs at least two scanning operations includingprescanning and actual scanning is characterized by comprising a tableconversion processing module for performing table conversion processingfor the digital data by using a look-up table, a determining module fordetermining an exposure state of the film original from prescanned imagedata which has undergone table conversion processing by the tableconversion processing module and is linear with respect to an outputfrom the A/D conversion unit, and setting an adjustment state of theadjustment unit in actual scanning in accordance with the exposurestate, and an image data generating module for performing digitalcalculation for the prescanned image data, and generating display imagedata which reflects a setting of the adjustment state.

[0036] Other objects and advantages besides those discussed above shallbe apparent to those skilled in the art from the description of apreferred embodiment of the invention which follows. In the description,reference is made to accompanying drawings, which form a part hereof,and which illustrate an example of the invention. Such example, however,is not exhaustive of the various embodiments of the invention, andtherefore reference is made to the claims which follow the descriptionfor determining the scope of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

[0037]FIG. 1 is a flow chart showing scanning by a film scanner servingas an image reading apparatus according to the first embodiment of thepresent invention;

[0038]FIG. 2 is a view showing the GUI of a film type display/selectingunit in the film scanner serving as the image reading apparatusaccording to the first embodiment of the present invention;

[0039]FIG. 3 is a block diagram showing the arrangement of the filmscanner serving as the image reading apparatus according to the firstembodiment of the present invention;

[0040]FIG. 4 is a block diagram showing the arrangement of the secondembodiment of the present invention;

[0041]FIG. 5 is a flow chart showing the relationship betweeninstructions and processes in a host computer and scanner;

[0042]FIG. 6 is a flow chart showing a pre-prescanning informationanalysis processing flow;

[0043]FIG. 7 is a flow chart showing a prescanning information analysisprocessing flow;

[0044]FIG. 8 is a table showing an example of a table set in a digitalsignal conversion table 11 in prescanning;

[0045]FIG. 9 is a block diagram showing the arrangement of aconventional film scanner; and

[0046]FIG. 10 is a table showing a color table corresponding to the filmtype.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0047] Preferred embodiments of the present invention will be describedbelow with reference to the accompanying drawings.

[0048] (First Embodiment)

[0049]FIG. 1 is a flow chart for explaining a processing flow in a filmscanner serving as an image reading apparatus according to the firstembodiment of the present invention. The film scanner will be describedin accordance with the processing flow. The first embodiment willexemplify a negative film, and a series of reading processes areexecuted under the control of a host PC (not shown) connected to thefilm scanner.

[0050] <Step S1>

[0051] The user loads a negative film into the scanner. Bar codes areprinted on the upper and lower surfaces of a negative film in advance inorder to specify a film type. The scanner has a sensor for reading a barcode, in addition to an image reading sensor, and can obtain a bar code.The scanner stores in advance a correspondence table for bar codes andfilm types, and can specify a film type from a bar code.

[0052] <Step S2>

[0053] The determined film type is so displayed as to allow the user torecognize it. FIG. 2 shows a display example on a GUI (Graphical UserInterface) according to the first embodiment. If a detected bar code isfound in the correspondence table, a corresponding film type name isdisplayed. If the bar code is not found in the correspondence table,“standard” is displayed. In this case, a standard table is set later,and prescanning and scanning are executed. Note that the GUI also servesas a film type selecting function. If the user clicks an invertedtriangle 301, the list box is opened down to display all registered filmtypes. The user can select an arbitrary film type from the displayedfilm types.

[0054] <Step S3>

[0055]FIG. 3 is a block diagram showing the scanner according to thefirst embodiment. The scanner has almost the same arrangement as that inFIG. 9, and a description of the same functions will be omitted. A colorconversion table corresponding to the film type selected in step S2 isset in the scanner. More specifically, a color table storage 406 storescolor conversion tables for respective film types. The color conversiontable is a one-dimensional LUT for each of R, G, and B, and is identicalto that shown in FIG. 10. That is, three LUTs are prepared for eachfilm. In step S3, a color conversion table corresponding to the filmtype selected in step S2 is set in an image data converter 407. FIG. 10shows a table for a 10-bit input and 8-bit output, but the firstembodiment adopts a 14-bit input and 16-bit output.

[0056] <Step S4>

[0057] Prescanning for acquiring a confirmation image is performed. Theimage data converter. 407 converts 14-bit negative data into 16-bitpositive data by using the color conversion table set in step S3. Thiswill be further explained with reference to FIG. 3. The color conversiontable has already been set in the image data converter 407. Image datais converted from negative data to positive data by using the colorconversion table, and the positive data is stored in a memory 408.

[0058] <Step S5>

[0059] If the scanner fails to determine the film type or the userreselects an arbitrary film type, the user reselects a film type byusing the GUI in FIG. 2. In FIG. 3, a table selected from colorconversion tables stored in the color table storage 406 is set in theimage data converter 407.

[0060] <Step S6>

[0061] Whether the user has reselected a film type is determined.

[0062] <Step S7>

[0063] If the user does not reselect any film type, actual scanning forobtaining a high-resolution image to be actually used is performed usingthe color conversion table which has already been set, thus obtaining animage. The same scanning as prescanning is done except the difference inresolution.

[0064] <Step S8>

[0065] If the user reselects a film type, color conversion correspondingto the reselected film type is performed for all prescanned images. Morespecifically, letting r1, g1, and b1 be values obtained from the colorconversion table which has already been set, and r2, g2, and b2 bevalues which should be obtained from the newly selected color conversiontable, differences Δ are

Δr=r2−r1

Δg=g2−g1

Δb=b2−b1

[0066] Hence, a corrected image is obtained by calculating thedifferences Δ from the two tables and adding the differences Δ to aconfirmation image. The result of color conversion is immediatelydisplayed on the monitor (not shown), and the user can confirm thedifferences between the tables as an image in real time. This will befurther explained with reference to the block diagram of FIG. 3. Thecolor conversion table used in prescanning and the color conversiontable newly reselected by the user are transferred from the colorconversion table storage 406 to a confirmation image changing unit 409.The confirmation image changing unit 409 calculates the differencesbetween the two tables. A prescanned image stored in the memory 408 istransferred to the confirmation image changing unit 409, and thecalculated differences are added. The processing result is transferredto the memory 408, and displayed on the monitor.

[0067] <Step S9>

[0068] The color conversion table reselected by the user is set in theimage data converter 407. Scanning for obtaining a high-resolution imageto be actually used is performed to acquire an image. The same scanningas prescanning is done except the differences in resolution and colorconversion table.

[0069] The present invention may be applied to a system including aplurality of devices (e.g., a computer, interface device, and scanner)or a single apparatus having these functions.

[0070] The present invention is also achieved when a storage medium (orrecording medium) which stores software program codes for realizing thefunctions of the first embodiment described above and the second andthird embodiments to be described later is supplied to a system orapparatus, and the computer (or the CPU or MPU) of the system orapparatus reads out and executes the program codes stored in the storagemedium. In this case, the program codes read out from the storage mediumrealize the functions of the embodiments, and the storage medium whichstores the program codes constitutes the present invention. Thefunctions of the embodiments are realized when the computer executes thereadout program codes. Also, the functions of the embodiments arerealized when an OS (Operating System) running on the computer performspart or all of actual processing on the basis of the instructions of theprogram codes.

[0071] The functions of the embodiments are also realized when theprogram codes read out from the storage medium are written in the memoryof a function expansion card inserted into the computer or the memory ofa function expansion unit connected to the computer, and the CPU of thefunction expansion card or function expansion unit performs part or allof actual processing on the basis of the instructions of the programcodes.

[0072] As described above, according to the first embodiment, the usercan select a film type even after prescanning when the scanner fails todetermine the bar code of a film but the user is not aware of it andperforms prescanning, or when determination of a bar code is successful,prescanning is performed using a color conversion table corresponding tothe film, but a proper color balance cannot be obtained. In the priorart, the user must interrupt scanning and restart it from film loading.According to the first embodiment, the user can continue work,increasing the working efficiency. If a desired color balance cannot beattained after prescanning, the user can successively reselect variouscolor conversion tables many times and adjust the color balance whileobserving the monitor. As a result, an image can be easily obtained witha good color balance.

[0073] (Second Embodiment)

[0074]FIG. 4 is a block diagram showing the arrangement of an “imageinput (image reading) system” according to the second embodiment. InFIG. 4, reference numeral 1 denotes a light source whose light quantity(light intensity) can be changed by a light control device 2; 3, atransparent film original whose feed speed can be changed by a feeder 4;5, a filter unit which incorporates an ND filter for adjusting the CCDarrival light quantity and a negative-base removal filter inserted inscanning a negative film; 6, a filter switching device; 7, a lens groupwhich condenses light having transmitted through the original 3; 8, aCCD for separation into three, R, G, and B colors that converts lighthaving transmitted through the lens group 7 into an electrical signal;9, an analog system which applies an electrical offset or gain to anelectrical signal obtained by the CCD 8; 10, an A/D converter; and 11, adigital image converter which converts a digital signal (negative dataor positive data) into another digital signal (positive data). An LUT(Look-Up Table) setting device 12 sets a color conversion table (LUT:Look-Up Table) in the digital image converter 11. The number of outputbits of the color conversion table set in the digital image converter 11is equal to or higher than the number of input bits (e.g., 14-bit inputand 16-bit output). Reference numeral 13 denotes a color conversionmatrix converter; 14, a matrix setting device which sets a matrixcoefficient in the matrix converter 13; 15, a storage for accumulating ascanned image; 16, a CPU which controls the respective units; 17, aninput device such as a keyboard; and 18, a monitor device.

[0075] A processing flow in the respective units will be explained withreference to FIGS. 4 and 5.

[0076] Scanning starts when the user sets an original on the scanner. InS201 of FIG. 5, if an original is set on the scanner, pre-prescanning isautomatically performed at a lower resolution than that in actualscanning. The setting values of pre-prescanning are fixed regardless ofthe film type. Setting values are not controlled by a host computer, butare held in the scanner main body and automatically set. At this time,information on the set original is transferred from the scanner to thehost computer. When a negative film is set as the original, an image inthe negative-base region and bar code information are transferred(S206).

[0077] The host computer receives and analyzes the pre-prescanninginformation (S207). When the set original is a negative film, the hostcomputer calculates the average count value of the negative-base fromthe image in the negative-base region, and decides an analog gaincondition which changes the average count value into a predeterminedvalue. The host computer analyzes the bar code information anddetermines the type of set negative film. Alternatively, the user canselect a film type on the GUI of the scanner driver. The host computerinstructs the scanner to set prescanning conditions in accordance withthe film type analyzed by pre-prescanning or the film type set by theuser. The scanner sets the conditions (S202). The conditions are uniqueto the film type, and the light control device 2, feeder 4, filterswitching device 6, LUT setting device 12, and matrix setting device 14in FIG. 4 are set. At this time, a look-up table (color conversiontable) which changes depending on the film type is not set in the LUTsetting device 12, but the same look-up table which provides a linearoutput with respect to A/D-converted digital data (output from the A/Dconverter 10) is set regardless of the film type.

[0078] Prescanning is executed at a lower resolution than that in actualscanning (S203). An analog signal obtained from the original under theset conditions is converted into a digital signal by the A/D converter10. Negative data is converted into positive data by the digital imageconverter 11 (for a negative film; for a positive film, this conversionprocessing is omitted). The prescanned image is accumulated in thescanned-image storage 15 of the host computer (S208). The CPU 16 createsa histogram from the prescanned image, and calculates a feature such asthe average count value or data distribution of the image (S209). Animage which simulates an actual scanning image is created from theprescanned image on the basis of the analysis result, and displayed as apreview image on the monitor device 18. In addition, the light quantityof the light source, filter, feed speed, gain, offset, actual scanningLUT, and matrix setting value are decided for optimal actual scanningconditions on the basis of the analysis result. To set these values, theadjustment states of adjustment means such as the light control device2, feeder 4, filter switching device 6, LUT setting device 12, andmatrix setting device 14 are controlled (set) (S204).

[0079] Actual scanning is performed under actual scanning conditions setin the above manner (S205). Light having passed through the filter unit5 is converted into an electrical signal by the CCD 8. The electricalsignal is converted into a digital signal by the A/D converter 10. Thedigital signal is further converted from a negative signal into apositive signal by the digital image converter 11. The positive signalis accumulated in the scanned-image storage 15 of the host computer viathe color correction matrix converter 13.

[0080] Processing in pre-prescanning information analysis S207 of FIG. 5will be explained in detail. In this case, an original to be processedin the first embodiment is a negative film. FIG. 6 is a flow chartshowing processing in pre-prescanning information analysis (S207).

[0081] In step S301, bar code information of a negative film isanalyzed. By analyzing bar code information of the negative film, thetype of negative film of a set original is determined.

[0082] In step S302, a film type is selected. In the first embodiment,scanning condition settings are determined in advance for each filmtype, and the scanning conditions are registered, in order to absorb thenegative-base density and color balance characteristic which changedepending on the film type. The scanning conditions are saved as asetting value file for each film type. In general, a film typedetermined from the bar code analyzed in step S301 is automaticallyselected. Note that the user can also select a film type on the GUI ofthe scanner driver. When the user selects a film type, priority is givennot to the automatically selected film type but the user-selected filmtype.

[0083] In step S303, the histogram of the negative-base image iscreated. Histograms for R, G, and B channels are created.

[0084] In step S304, the average value of the negative-base image iscalculated. The average count values of the R, G, and B channels arecalculated from the histograms created in S303.

[0085] In step S305, whether the average value of the negative-baseimage calculated in S304 falls within a predetermined range isdetermined. If NO in S305, scanning of the negative-base region inpre-prescanning is determined to fail due to some reason. If YES inS305, the processing shifts to S306; if NO, to S307.

[0086] In step S306, the analog gain of prescanning is decided. Theanalog gain which attains a predetermined value in scanning underscanning conditions for the film type to which the average value of thenegative-base image calculated in S304 is selected is calculated.

[0087] In step S307, an analog gain when pre-prescanning fails and thenegative-base average value cannot be acquired is set. In this case,analog gain data is read out from a setting value file for the selectedfilm type, and the data is set. Even for the same negative film type,the negative-base color slightly changes owing to variations inphenomenon or the like. The analog gain value in the setting value fileis an analog gain calculated on the basis of the average negative-basevalue of the film type. Since the negative-base count value is set to apredetermined value in prescanning, the analog gain set in step S307 islower in precision than the analog gain calculated in S306.

[0088] In step S308, prescanning conditions are set. Scanning conditionsetting values other than the analog gain which has already been decidedare read out from the setting value file for the selected film type. Inprescanning, the same color conversion table (look-up table) whichprovides a linear output with respect to A/D-converted digital data isset in the digital image converter 11 regardless of the film type.

[0089] Processing in prescanning information analysis S209 of FIG. 5will be described in detail. In this case, an original to be processedin the present invention is a negative film. FIG. 7 is a flow chartshowing processing in prescanning information analysis (S209) by the CPU16.

[0090] In step S401, the histogram of a prescanned image is created. Theprescanned image is positive image data which is linear with respect toA/D-converted digital data. For example, a look-up table for a 14-bitinput and 16-bit output as shown in FIG. 8 is set in the digital imageconverter 11 of FIG. 4. In this case, a prescanned image is an imagewhich is converted from a negative image to a positive image by using alook-up table as shown in FIG. 8 which provides a linear output withrespect to A/D-converted digital data. The histogram of each channel ofa prescanned image which is linear with respect to A/D-converted digitaldata is created.

[0091] In step S402, the average count value of each channel iscalculated from the histogram created in S401.

[0092] In step S403, the data range of each channel is calculated fromthe histogram created in S401. A count value at several % of pixelssubjected to the histogram is calculated as a white point/black pointfrom the highlight portion/shadow portion of the histogram. The blackpoint count value is subtracted from the white point count value of eachchannel, calculating the data range of the channel.

[0093] In step S404, the exposure condition (exposure state) of an imagerecorded on a negative film original to be read is determined. Theexposure condition is determined from the average value of each channelcalculated in S402 and the data range of each channel calculated inS403. For example, an overexposed image is printed dark on a negativefilm at a high density, and the data range of its prescanned image isnarrow. From this, when the data range of each channel is narrower thana predetermined value, the target image can be determined to beoverexposed. For an underexposed image, the data range is not sodifferent from that in correct exposure. However, an underexposed imagescanned using a linear look-up table as shown in FIG. 8 results in adark image. Thus, when the average value of each channel is smaller thana predetermined value, the image can be determined to be underexposed.

[0094] In step S405, the analog setting conditions (adjustment states)of adjustment means except the look-up table are decided (set). Items tobe set are the illumination light quantity of the light source, filter,feed speed, gain, offset, and matrix. If overexposure is determined inS404, conditions are so set as to widen the data range. If underexposureis determined, conditions are so set as to prevent data saturation and“blocked-up” because A/D-converted digital data is almost saturated and“blocked-up” may occur in analog settings of prescanning. If correctexposure is determined, the same conditions as those in prescanning areset.

[0095] In step S406, the condition branches depending on exposuredetermined in S404. The processing advances to S407 for overexposure orunderexposure, or to S408 for correct exposure.

[0096] In step S407, the prescanned image is corrected. If overexposureor underexposure is determined, scanning condition settings aredifferent between prescanning and actual scanning. A/D-converted digitaldata upon changing scanning conditions must be predicted to convert aprescanned image. The prescanned image is positive image data which islinear with respect to A/D-converted digital data. The CPU 16 changesanalog settings (settings for the adjustment states of respectiveadjustment means), and calculates how many times A/D-converted digitaldata is larger. The CPU 16 performs digital calculation for theprescanned image data, reflecting the result on each pixel value of theprescanned image. In this way, an actual scanning image can be simulatedfrom the prescanned image without changing analog settings and executingscanning again.

[0097] In step S408, the prescanned image is converted using a look-uptable corresponding to the selected film type. Linear-luminance positivedata converted using a look-up table which provides a linear output withrespect to A/D-converted digital data is converted into positive datawhich reflects the characteristic of each film type, absorbing thenegative-base color characteristic and color balance characteristicwhich change depending on the film type. For this purpose, the settingvalue file stores in advance a look-up table for converting positivedata to positive data for each film type. The CPU 16 performs tableconversion processing for the prescanned image by using a look-up tablecorresponding to each film type. Since the prescanned image is datawhich is linear with respect to A/D-converted digital data, look-uptable conversion processing for each film type can be easily executed.This processing can provide the same prescanned image as an imageobtained by scanning using a look-up table for a selected film type withthe same analog gain setting in prescanning as that in actual scanning.

[0098] In step S409, the histogram of the prescanned image havingundergone table conversion processing based on the look-up table foreach film type in S408 is created. The histogram of each channel iscreated for the converted prescanned image.

[0099] In step S410, the average value of the prescanned image convertedin S408 is calculated. The average value of each channel is calculatedfrom the histogram.

[0100] In step S411, the white/black point of the prescanned imageconverted in S408 is calculated. A count value at several % of pixelssubjected to the histogram is calculated as a white point/black pointfrom the highlight portion/shadow portion of the histogram.

[0101] In step S412, the gamma value of each channel is calculated. Thegamma value is calculated such that the average value of each channelcalculated in S410 becomes a predetermined target value afternormalization using the white/black point in S411. The gamma value iscalculated by

γ=log((Ave−Lo)/(Hi−Lo))/log(Target/Max)

[0102] where Ave is the average value, Lo is the black point, Hi is thewhite point, Target is a predetermined target value, and Max is themaximum value expressible by the number of bits of a prescanned image.

[0103] In step S413, a color conversion table for a preview image(monitor display) is created. Based on the white/black point calculatedin S411 and the gamma value calculated in S412, the CPU 16 creates acolor conversion table (look-up table) for generating a monitor displaypreview image whose contrast, brightness, and color balance areadjusted, from the prescanned image which has been converted fromnegative data to positive data on the basis of the linear-luminancelook-up table and has undergone conversion processing of reflecting thecolor balance and the like corresponding to each film type by using thepositive/positive conversion look-up table for each film type.

[0104] In step S414, a preview image (display image) is created. The CPU16 creates a preview image (display image) by executing table conversionusing the look-up table created in S413 and matrix conversion identicalto a matrix coefficient set in the color correction matrix converter 13of FIG. 4, for the positive-converted prescanned image which reflects acolor balance corresponding to each film type. The created preview imageis displayed on the monitor device 18 of FIG. 4.

[0105] In step S415, an actual scanning look-up table is created. Theactual scanning look-up table is created by the CPU 16 by synthesizingthe linear-luminance look-up table for negative/positive conversion, alook-up table for each film type, and the preview image look-up tablecreated in step S413.

[0106] As described above, according to the second embodiment, scanningconditions for actual scanning are set after the exposure condition of atarget image is determined from the average value and data range of aprescanned image which is linear with respect to A/D-converted digitaldata. The exposure condition of a target image can be determined at ahigh precision, and scanning conditions for actual scanning optimal foreach exposure condition can be set. The prescanned image is data whichis linear with respect to A/D-converted digital data. When scanningconditions are different between prescanning and actual scanning,A/D-converted digital data in actual scanning can be easily predictedfrom a prescanned image.

[0107] After that, the prescanned image is converted using a look-uptable corresponding to a selected film type. The converted prescannedimage is analyzed to set an actual scanning look-up table, and a previewimage is created. The negative-base color characteristic and colorbalance characteristic which change depending on the film type can beabsorbed. An image can be reproduced on any film with a stable colorbalance.

[0108] (Third Embodiment)

[0109] The third embodiment which is different from the first embodimentin the prescanned image generation method will be described. Similar tothe first embodiment, the third embodiment will be explained withreference to the flow chart of FIG. 1 and the block diagram of FIG. 3.The third embodiment will exemplify a negative film, and a series ofreading processes are executed under the control of a host PC (notshown) connected to a film scanner.

[0110] <Step S1>

[0111] The user loads a negative film into the scanner. Bar codes areprinted on the upper and lower surfaces of a negative film in advance inorder to specify a film type. The scanner has a sensor for reading a barcode, in addition to an image reading sensor, and can obtain a bar code.The scanner stores in advance a correspondence table for bar codes andfilm types, and can specify a film type from a bar code.

[0112] <Step S2>

[0113] The determined film type is so displayed as to allow the user torecognize it. FIG. 2 shows a display example on a GUI according to thethird embodiment. If a detected bar code is found in the correspondencetable, a corresponding film type name is displayed. If the bar code isnot found in the correspondence table, “standard” is displayed. In thiscase, a standard table is set later, and prescanning and scanning areexecuted. Note that the GUI also serves as a film type selectingfunction. If the user clicks an inverted triangle 301, the list box isopened down to display all registered film types. The user can select anarbitrary film type from the displayed film types.

[0114] <Step S3>

[0115] A color conversion table which provides a linear luminance is setin an image data converter 407. That is, the image data converter 407holds not different color conversion tables (look-up tables) forrespective film types, but a look-up table (linear-luminance colorconversion table) as shown in FIG. 8 which provides a linear output withrespect to the same A/D-converted digital data regardless of the filmtype, similar to the second embodiment.

[0116] <Step S4>

[0117] Prescanning for acquiring a confirmation prescanned image isperformed. The image data converter 407 converts 14-bit negative datainto 16-bit positive data by using the linear-luminance color conversiontable set in step S3. The converted data is stored as prescanned imagedata having a linear luminance characteristic in a memory 408.Prescanned image data having a linear luminance characteristic ispositive image data which is linear with respect to A/D-converteddigital data. The linear-luminance positive image data is held as anoriginal image till the end of prescanning. A color table storage 406stores color conversion tables corresponding to respective film types.The linear-luminance image data loses its color balance because any filmundergoes negative/positive conversion using the color conversion tablein FIG. 8. To adjust the color balance, the image data converter 407reads out from the color table storage 406 a color conversion tablecorresponding to the film type selected in step 2 for thelinear-luminance prescanned image data stored in the memory 408. Theimage data converter 407 uses the readout color conversion table toconvert linear-luminance positive data stored in the memory 408 intopositive data which reflects the characteristic of each film type. Theconverted positive data is stored in the memory 408. With a colorconversion table corresponding to the film type, the difference in colorbalance due to the difference in film type can be absorbed.

[0118] <Step S5>

[0119] If the scanner fails to determine the film type or the userreselects an arbitrary film type, the user reselects a film type byusing the GUI in FIG. 2. Even with the same bar code, the color balancemay change due to variations in photographing conditions, filmdeveloping, and the like. To cope with this situation in the thirdembodiment, the user can register a plurality of types of tables withdifferent color balances, details of which will not be described. Forexample, for a film type “Codak Gold 100”, a plurality of tables such as“Codak Gold 100-1”, “Codak Gold 100-2”, and “Codak Gold 100-3” areregistered with different color balances for the same bar code in thecolor table storage 406. The user can arbitrarily select a table byusing the GUI in FIG. 2.

[0120] <Step S6>

[0121] Whether the user has reselected a film type, i.e., table isdetermined.

[0122] <Step S7>

[0123] If the user does not reselect any film type, the linear-luminancetable and a color conversion table corresponding to the film type whichhas already been selected automatically are synthesized, and thesynthesized table is set in the image data converter 407. Scanning forobtaining a high-resolution image to be actually used is performed,obtaining an image. The same scanning as prescanning is done except thedifferences in resolution and color table. The scanning result istransferred to the memory 408 and displayed on the monitor, or recordedon a hard disk.

[0124] <Step S8>

[0125] If the user reselects a film type, color conversion correspondingto the reselected film type is performed for all prescanned images. Thatis, a color table corresponding to the reselected film type is appliedto linear-luminance original image data. The result of color conversionis immediately displayed on the monitor (not shown), and the user canconfirm the difference between the tables as an image in real time. Thiswill be further explained with reference to the block diagram of FIG. 3.The color conversion table newly reselected by the user is transferredfrom the color conversion table storage 406 to a confirmation imagechanging unit 409. The prescanned original image stored in the memory408 is transferred to the confirmation image changing unit 409, thetable reselected by the user is applied, and processing is executed. Theprocessing result is transferred to the memory 408, and displayed on themonitor.

[0126] <Step S9>

[0127] The linear-luminance table and the color conversion tablereselected by the user are synthesized, and the synthesized table is setin the image data converter 407. Scanning for obtaining ahigh-resolution image to be actually used is performed, obtaining animage. The same scanning as prescanning is done except the differencesin resolution and color conversion table. The scanning result istransferred to the memory 408 and displayed on the monitor, or recordedon a hard disk.

[0128] Note that the third embodiment adopts a linear-luminance table inorder to obtain an original image in prescanning. However, the presentinvention is not limited to this as long as the same table is usedregardless of the film type. For example, a table with a linear densitycharacteristic or a nonlinear table with an arbitrary shape can beemployed.

[0129] As described above, according to the third embodiment, the usercan reselect a film type even after prescanning.

[0130] Moreover, a high-quality image can be reproduced by accuratelydetermining the exposure condition of an original film and performingoptimal analog settings. The color balance characteristic which changesdepending on the film type can be eliminated, and an actual scanningimage by a preview image can be easily simulated at a high precision.

[0131] The present invention is not limited to the above embodiments andvarious changes and modifications can be made within the spirit andscope of the present invention. Therefore, to apprise the public of thescope of the present invention the following claims are made.

What is claimed is:
 1. An image reading system which can read a filmoriginal and performs at least two scanning operations includingprescanning and actual scanning, comprising a film type selecting unit,wherein a film type can be selected by said film type selecting unitafter obtaining at least prescanned image data.
 2. The system accordingto claim 1, wherein the system further comprises an image changing unitadapted to change prescanned image data, and when the film type ischanged by said film type selecting unit after obtaining prescannedimage data, the prescanned image data is changed by said image changingunit in accordance with the changed film type.
 3. The system accordingto claim 2, wherein said image changing unit holds original image dataobtained in acquiring prescanned image data, and applies to the originalimage data a color conversion table corresponding to a film type newlyselected by said film type selecting unit after acquiring the prescannedimage data.
 4. The system according to claim 2, wherein the systemfurther comprises an image display unit, and when the film type ischanged by said film type selecting unit after obtaining prescannedimage data, the prescanned image data is changed by said image changingunit in accordance with the changed film type, and a result can beconfirmed by said image display unit.
 5. The system according to claim2, wherein said image changing means comprises a calculation unitadapted to calculate a difference between a color conversion table usedto acquire prescanned image data and a color conversion tablecorresponding to a film type newly selected by said film type selectingunit after acquiring prescanned image data, and means for adding thecalculated difference to the prescanned image data.
 6. An image readingprogram in an image reading system which can read a film original andperforms at least two scanning operations including prescanning andactual scanning, comprising: a prescanning module for obtainingprescanned image data; an actual scanning module for obtaining actuallyscanned image data; and a film type selecting module, wherein a filmtype can be selected in the film type selecting module after obtainingat least the prescanned image data.
 7. The program according to claim 6,wherein the program further comprises an image changing module forchanging prescanned image data, and when the film type is changed by thefilm type selecting module after obtaining prescanned image data, theprescanned image data is changed by the image changing module inaccordance with the changed film type.
 8. The program according to claim7, wherein the image changing module holds original image data obtainedin acquiring prescanned image data, and applies to the original imagedata a color conversion table corresponding to a film type newlyselected by the film type selecting module after acquiring theprescanned image data.
 9. The program according to claim 7, wherein theprogram further comprises an image display module, and when the filmtype is changed by the film type selecting module after obtainingprescanned image data, the prescanned image data is changed by the imagechanging module in accordance with the changed film type, and a resultcan be confirmed by the image display module.
 10. The program accordingto claim 7, wherein the image changing module comprises a module forcalculating a difference between a color conversion table used toacquire prescanned image data and a color conversion table correspondingto a film type newly selected by the film type selecting module afteracquiring prescanned image data, and a module for adding the calculateddifference to the prescanned image data.
 11. An image reading systemwhich can read a film original and performs at least two scanningoperations including prescanning and actual scanning, comprising: aphotoelectric conversion unit adapted to read light having transmittedthrough the film original and converting the transmitted light into anelectrical signal; an adjustment unit adapted to adjust level of theelectrical signal output from said photoelectric conversion means; anA/D conversion unit adapted to convert the electrical signal whose levelis adjusted by said adjustment unit into digital data; a tableconversion processing unit adapted to perform table conversionprocessing for the digital data by using a look-up table; and a controlunit adapted to determine an exposure state of the film original fromprescanned image data which has undergone table conversion processing bysaid table conversion processing unit and is linear with respect to anoutput from said A/D conversion unit, setting an adjustment state ofsaid adjustment unit in actual scanning in accordance with the exposurestate, performing digital calculation for the prescanned image data, andgenerating display image data which reflects a setting of the adjustmentstate.
 12. The system according to claim 11, wherein said tableconversion processing unit performs table conversion processing using alinear look-up table which provides a linear output with respect todigital data A/D-converted by said A/D conversion unit.
 13. The systemaccording to claim 12, wherein said control unit performs tableconversion processing using a look-up table corresponding to a type ofthe film original for the linear prescanned image data.
 14. The systemaccording to claim 13, wherein said control unit creates a display imagegeneration look-up table for generating display image data fromprescanned image data having undergone table conversion processing usingthe look-up table corresponding to the type of the film original, andgenerates a display image on the basis of the created look-up table. 15.The system according to claim 14, wherein said control unit creates anactual scanning look-up table by synthesizing the linear look-up table,the look-up table corresponding to the type of the film original, andthe display image generation look-up table, and causes said tableconversion processing means to perform table conversion processing foractually scanned data by using the created actual scanning look-uptable.
 16. The system according to claim 11, wherein said control unitperforms table conversion processing using a look-up table correspondingto a type of the film original for the linear prescanned image data. 17.The system according to claim 16, wherein said control unit creates adisplay image generation look-up table for generating display image datafrom prescanned image data having undergone table conversion processingusing the look-up table corresponding to the type of the film original,and generates a display image on the basis of the created look-up table.18. The system according to claim 11, wherein said control unitdetermines the exposure state of the film original from an average countvalue and data range of the prescanned image data which is linear withrespect to the output from said A/D conversion unit.
 19. The systemaccording to claim 11, wherein when said control unit determines correctexposure, said control unit sets the adjustment state of said adjustmentunit in actual scanning to be identical to an adjustment state inprescanning.
 20. The system according to claim 11, wherein when saidcontrol unit determines overexposure or underexposure, said control unitsets the adjustment state of said adjustment unit in actual scanning tobe different from an adjustment state in prescanning.
 21. The systemaccording to claim 20, wherein when said control unit determinesoverexposure or underexposure, said control unit predicts an output fromsaid A/D conversion unit upon changing the setting of the adjustmentstate of said adjustment unit, performs digital calculation for theprescanned image, and generates display image data.
 22. An image readingprogram in an image reading system which can read a film original,comprises a photoelectric conversion unit adapted to read light havingtransmitted through the film original and converting the transmittedlight into an electrical signal, an adjustment unit adapted to adjustlevel of the electrical signal output from the photoelectric conversionunit, and an A/D conversion unit adapted to convert the electricalsignal whose level is adjusted by the adjustment unit into digital data,and performs at least two scanning operations including prescanning andactual scanning, comprising: a table conversion processing module forperforming table conversion processing for the digital data by using alook-up table; a determining module for determining an exposure state ofthe film original from prescanned image data which has undergone tableconversion processing by the table conversion processing module and islinear with respect to an output from the A/D conversion unit, andsetting an adjustment state of the adjustment unit in actual scanning inaccordance with the exposure state; and an image data generating modulefor performing digital calculation for the prescanned image data, andgenerating display image data which reflects a setting of the adjustmentstate.
 23. The program according to claim 22, wherein the tableconversion processing module performs table conversion processing usinga linear look-up table which provides a linear output with respect todigital data A/D-converted by the A/D conversion unit.
 24. The programaccording to claim 23, wherein the table conversion processing moduleperforms table conversion processing using a look-up table correspondingto a type of the film original for the linear prescanned image data. 25.The program according to claim 24, wherein the program further comprisesa look-up table creating module for creating a display image generationlook-up table for generating display image data from prescanned imagedata having undergone table conversion processing using the look-uptable corresponding to the type of the film original, and the image datagenerating module generates a display image on the basis of the look-uptable created by the look-up table creating module.
 26. The programaccording to claim 25, wherein the look-up table creating module createsan actual scanning look-up table by synthesizing the linear look-uptable, the look-up table corresponding to the type of the film original,and the display image generation look-up table, and the table conversionprocessing module performs table conversion processing for actuallyscanned data by using the created actual scanning look-up table.
 27. Theprogram according to claim 22, wherein the table conversion processingmodule performs table conversion processing using a look-up tablecorresponding to a type of the film original for the linear prescannedimage data.
 28. The program according to claim 27, wherein the programfurther comprises a look-up table creating module for creating a displayimage generation look-up table for generating display image data fromprescanned image data having undergone table conversion processing usingthe look-up table corresponding to the type of the film original, andthe image data generating module generates a display image on the basisof the look-up table created by the look-up table creating module. 29.The program according to claim 22, wherein the determining moduledetermines the exposure state of the film original from an average countvalue and data range of the prescanned image data which is linear withrespect to the output from the A/D conversion unit.
 30. The programaccording to claim 22, wherein when the determining module determinescorrect exposure, the determining module sets the adjustment state ofthe adjustment unit in actual scanning to be identical to an adjustmentstate in prescanning.
 31. The program according to claim 22, whereinwhen the determining module determines overexposure or underexposure,the determining module sets the adjustment state of the adjustment unitin actual scanning to be different from an adjustment state inprescanning.
 32. The program according to claim 31, wherein when thedetermining module determines overexposure or underexposure, the imagedata generating module predicts the output from the A/D conversion unitupon changing the setting of the adjustment state of the adjustmentunit, performs digital calculation for the prescanned image, andgenerates display image data.